package com.android.love.parser;

import com.alibaba.fastjson.JSON;
import com.android.love.util.LogUtil;
import com.android.love.vo.MeixiuOrder;

public class MeixiuOrderParser extends BaseParser<MeixiuOrder> {
	private static final String TAG = "AddressParser";

	@Override
	public MeixiuOrder parserJson(String jsonStr) {
		MeixiuOrder ids = null;
		LogUtil.i(TAG, "data11---" + jsonStr);
		if (checkResponse(jsonStr)) {
			String data = jsonObject.getString("data");
			LogUtil.i(TAG, "data---" + data);
			if (data != null) {
				ids=new MeixiuOrder();
				jsonObject = JSON.parseObject(data);
				String order_no = jsonObject.getString("order_no");
				String trade_no = jsonObject.getString("trade_no");
				int purchased=jsonObject.getInteger("purchased");
				int album_id=jsonObject.getInteger("album_id");
				ids.setAlbum_id(album_id);
				ids.setOrder_no(order_no);
				ids.setTrade_no(trade_no);
				ids.setPurchased(purchased);
				// if (trade_no != null)
				// else
				// ids[1] = 0L;
				return ids;
			}
		}
		// LogUtil.i(TAG, "address_id---" + order_id);
		return null;
	}
}
